package com.xnyzc.lhy.mis.service.oss;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.service.oss.hystrix.IOaOssFileClientServiceHystrix;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Feign 资源服务
 * 获取文件地址
 * zhuyubin
 */
@Service
@FeignClient(value = "${feign.applicationName.resource}", fallback = IOaOssFileClientServiceHystrix.class)
public interface IOaOssFileClientService {

    /**
     * 获取文件地址
     * @param fileId 文件id
     * @return
     */
    @GetMapping(value = "oa/oss/getFileUrl")
    Rv getFileUrl(@ApiParam(name = "fileId", value = "文件ID") @RequestParam(value = "fileId") Long fileId);

    /**
     * 获取文件地址
     * @param fileId 文件id
     * @return
     */
    @GetMapping(value = "oa/cos/getFileUrl")
    Rv getFileUrlCos(@ApiParam(name = "fileId", value = "文件ID") @RequestParam(value = "fileId") Long fileId);

}
